<?php
declare (strict_types = 1);

namespace app\controller;

use app\BaseController;
use app\common\Upload;
use think\Request;

class OSSController extends BaseController
{
    #获取音视频上传地址和凭证
	function getVideoUploadAuth()
	{
		$filename = $this->request->get('filename');
		$title = $this->request->get('title');
        $coverurl = $this->request->get('coverurl');
        try {
            $ret = Upload::createUploadVideo($filename,$title,$coverurl);
        }catch (\Throwable $e){
            $this->writeJson(0,$e->getMessage());
        }
		$this->writeJson($ret);
   }
}
